#-*- coding:UTF-* -*-
s="abc"
t="bac"
def anagram(self, s, t):
    lists=list(s)
    listt=list(t)
    lists.sort()
    listt.sort()
    return "".join(lists)=="".join(listt)
print anagram("",s,t)